package com.gupao.delegate;

import java.util.HashMap;

/**
 * @Description: //TODO:作为一个对象来记录返回的结果信息
 * @ClassName: DoResult
 * @Author: msx
 * @CreateDate: 2018/3/19 17:04
 */
public class DoResult extends HashMap<String, Object> {


    public DoResult() {
        put("success", Boolean.valueOf(false));
    }


    public DoResult(boolean successfule) {
        put("success", Boolean.valueOf(successfule));
    }


    /**
     * 执行结果
     */
    private boolean success;

    /**
     * 执行结果信息
     */
    private String message;


    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    @Override
    public String toString() {
        return "DoResult{" +
                "success=" + success +
                ", message='" + message + '\'' +
                '}';
    }
}
